@echo off
setLocal EnableDelayedExpansion

set PYTHON_OUT=generated\python

rmdir /S /Q %PYTHON_OUT%
mkdir %PYTHON_OUT%

set PROTOC_CMD=protoc-2.6.1-win32\protoc -I=protos --python_out=%PYTHON_OUT%
for /D %%f in (protos/*) do (
  set PROTOC_CMD=!PROTOC_CMD! protos\%%f\*.proto
)

echo %PROTOC_CMD%
call %PROTOC_CMD%

pause